﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Entity;
using Entity.Car_Rental;

namespace Data.Car_Rental
{
    public interface IProductRepository : IBackgroundRepository<Product>
    {
        /// <summary>
        /// 订车与排队
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        VMessage Car_Rental(Product entity);

        /// <summary>
        /// 得到车列表
        /// </summary>
        /// <param name="vp"></param>
        /// <param name="pp"></param>
        /// <returns></returns>
        PagedList<Product> GetProduct(VPredication vp, PagingParam pp);

        /// <summary>
        /// 前台得到所有模块
        /// </summary>
        /// <returns></returns>
        IQueryable<Product> GetModelForSite();
        /// <summary>
        /// 后台得到所有模块
        /// </summary>
        IQueryable<Product> GetModelForBackground();
        /// <summary>
        /// 详细结果集
        /// </summary>
        /// <returns></returns>
        IQueryable<Product> GetDetailModel();
        /// <summary>
        /// 更新product表的count字段，count为正，表示加，反之表示减
        /// </summary>
        /// <param name="productID"></param>
        /// <param name="count"></param>
        void UpdateProductCount(long productID, int count);
    }
}
